#include "Rp2BlendedTerrainEffect.h"

using namespace Rp2;

RP2_IMPLEMENT_RTTI(Rp2, BlendedTerrainEffect, ShaderEffect);
RP2_IMPLEMENT_DEFAULT_NAME_ID(BlendedTerrainEffect, ShaderEffect);

//---------------------------------------------------------------------------------------------------
BlendedTerrainEffect::BlendedTerrainEffect (const char* acGrassName, const char* acStoneName)
    :
    ShaderEffect(1)
{
	m_kVShader[0] = new VertexShader("BlendedTerrain");
	m_kPShader[0] = new PixelShader("BlendedTerrain");

    m_kPShader[0]->SetTexture(0,acGrassName);
    m_kPShader[0]->SetTexture(1,acStoneName);

    Texture* pkGrass = m_kPShader[0]->GetTexture(0);
    pkGrass->SetFilterType(Texture::NEAREST_NEAREST);
    pkGrass->SetWrapType(0,Texture::REPEAT);
    pkGrass->SetWrapType(1,Texture::REPEAT);

    Texture* pkStone = m_kPShader[0]->GetTexture(1);
    pkStone->SetFilterType(Texture::NEAREST_NEAREST);
    pkStone->SetWrapType(0,Texture::REPEAT);
    pkStone->SetWrapType(1,Texture::REPEAT);
}
//---------------------------------------------------------------------------------------------------
BlendedTerrainEffect::~BlendedTerrainEffect ()
{
}
//---------------------------------------------------------------------------------------------------